package cn.tedu.thread;
//测试 Runnable接口
public class Test3_Runnable {
    public static void main(String[] args) {
        MyRunnable target = new MyRunnable();
        Thread t = new Thread(target,"猪猪霞");

        t.start();

        Thread t2 = new Thread(target,"蜘蛛霞");

        t2.start();
    }
}
class MyRunnable implements Runnable{

    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            System.out.println(Thread.currentThread().getName() + "===" + i);
        }
    }
}